import request from '@/utils/request'

// 查询问诊功能列表
export function listConsult(query) {
  return request({
    url: '/doctor/consult/list',
    method: 'get',
    params: query
  })
}

// 查询医生列表
export function listDoctor(query) {
  return request({
    url: '/doctor/doctor/all',
    method: 'get',
    params: query
  })
}

// 查询患者列表
export function listPatient(query) {
  return request({
    url: '/doctor/patient/list',
    method: 'get',
    params: query
  })
}

// 查询问诊功能详细
export function getConsult(id) {
  return request({
    url: '/doctor/consult/' + id,
    method: 'get'
  })
}

// 新增问诊功能
export function addConsult(data) {
  return request({
    url: '/doctor/consult',
    method: 'post',
    data: data
  })
}

// 修改问诊功能
export function updateConsult(data) {
  return request({
    url: '/doctor/consult',
    method: 'put',
    data: data
  })
}

// 删除问诊功能
export function delConsult(id) {
  return request({
    url: '/doctor/consult/' + id,
    method: 'delete'
  })
}
